//
//  LWHeaderView.m
//  豆瓣
//
//  Created by 刘伟 on 16/7/7.
//  Copyright © 2016年 刘伟. All rights reserved.
//

#import "LWHeaderView.h"
@interface    LWHeaderView()
@property (weak, nonatomic) IBOutlet UILabel *cityLB;

@end

@implementation LWHeaderView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
         self  = [[[NSBundle mainBundle ] loadNibNamed:@"LWHeaderView" owner:nil options:nil] lastObject];
        UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(Click:)];
        [self.cityLB addGestureRecognizer:tap];
    }
    return  self;

}
-(void)Click:(UITapGestureRecognizer*)gesture{
    UILabel * lb = (UILabel*)gesture.view;
    if ([self.delegate respondsToSelector:@selector(seletedCity:)]) {
        [self.delegate seletedCity:lb];
    }

}
@end
